package com.chance.cc.crawler.prod.command.schedule.news.baidu;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.baijiahao.realtime.BJHRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.baijiahao.trace.BJHCommentTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.baijiahao.trace.BJHTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.qqhao.realtime.QQHaoRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.qqhao.trace.QQHaoCommentTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.qqhao.trace.QQHaoTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.realtime.BaiDuTopicRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.trace.BaiDuTieBaTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.trace.BaiDuTopicCommentTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.trace.BaiDuTopicTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.zhidao.realtime.BaiDuZhiDaoRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.zhidao.trace.BaiDuZhiDaoCommentTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.zhidao.trace.BaiDuZhiDaoTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.schedule.CommonCrawlerJobSchedule;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-04-10 11:10:48
 * @email okprog@sina.com
 */
public class BaiDuCommonCrawlerJobScheduler extends CommonCrawlerJobSchedule {
    public static void main(String[] args) {
//        publicCrawlerScheduleJob(BaiDuTopicRealtimeCrawlerSchedulerJob.crawlerScheduler());

        publicCrawlerScheduleJob(BaiDuTopicTraceCrawlerSchedulerJob.crawlerScheduler());
        publicCrawlerScheduleJob(BaiDuTieBaTraceCrawlerSchedulerJob.crawlerScheduler());

//        publicCrawlerScheduleJob(BaiDuTopicCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //bjh
//        publicCrawlerScheduleJob(BJHRealtimeCrawlerSchedulerJob.crawlerScheduler());
//
//        publicCrawlerScheduleJob(BJHTraceCrawlerSchedulerJob.crawlerScheduler());
//
//        publicCrawlerScheduleJob(BJHCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //qqh
//        publicCrawlerScheduleJob(QQHaoRealtimeCrawlerSchedulerJob.crawlerScheduler());
//
//        publicCrawlerScheduleJob(QQHaoTraceCrawlerSchedulerJob.crawlerScheduler());
//
//        publicCrawlerScheduleJob(QQHaoCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //zhidao
//        publicCrawlerScheduleJob(BaiDuZhiDaoRealtimeCrawlerSchedulerJob.crawlerScheduler());

//        publicCrawlerScheduleJob(BaiDuZhiDaoTraceCrawlerSchedulerJob.crawlerScheduler());

//        publicCrawlerScheduleJob(BaiDuZhiDaoCommentTraceCrawlerSchedulerJob.crawlerScheduler());
    }

    public static void publicCrawlerScheduleJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_17.republishCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_7);
    }

    public static void delCrawlerJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_17.deleteCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_7);
    }

    @Test
    public void delCrawlerJob(){
        delCrawlerJob(BaiDuTopicRealtimeCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BaiDuTopicTraceCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BaiDuTopicCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //bjh
        delCrawlerJob(BJHRealtimeCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BJHTraceCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BJHCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //qqh
        delCrawlerJob(QQHaoRealtimeCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(QQHaoTraceCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(QQHaoCommentTraceCrawlerSchedulerJob.crawlerScheduler());

        //zhidao
        delCrawlerJob(BaiDuZhiDaoRealtimeCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BaiDuZhiDaoTraceCrawlerSchedulerJob.crawlerScheduler());

        delCrawlerJob(BaiDuZhiDaoCommentTraceCrawlerSchedulerJob.crawlerScheduler());
    }
}
